# coding=utf-8

# from flask import Flask, request

# appfile = Flask(__name__)


# @appfile.route('/')
# def hello_world():
#     return 'hello_world'

# if __name__ == '__main__':
#     appfile.debug = True
#     appfile.run(port=8085)


import base64

def base64ToPicAndSave(base64Str):
    # if (base64Str.index('data:') == 0):
        # base64Str = base64Str.split('base64,')[1]

    imgdata=base64.b64decode(base64Str)
    # print(base64Str)
    with open('image/1111.jpg', 'wb') as file:
        file.write(imgdata)

def picToBase64(path):
    with open(path,"rb") as f:  
        # b64encode是编码，b64decode是解码  
        base64_data = base64.b64encode(f.read())  
        # base64.b64decode(base64data)  
        print(base64_data)

def exampleOfList():
    IMAGE_PATH = 'image/'
    files = 'htrhyrtretg.jpg;vcxe34t65jhrt5.jpg'
    filesArr = []

    if files:
        for item in files.split(';'):
            item = IMAGE_PATH + item
            filesArr.append(item)

    print(';'.join([filesArr]))


# base64ToPicAndSave
print(len(''))